<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
 
    <h:form>
        <rich:tabPanel id="tabsPanel"  activeItem="#{tabsBean.activeTab}" >
         
            <rich:tab header="Static">
                <p>This tab is static one.</p>
                 
                <p>All of the following tabs are dynamically generated using <b>a4j:repeat</b>.</p>
                
                <h:outputText value="#{tabsBean.tabs.size()}" />
            </rich:tab>
    

            <ui:repeat var="tab" value="#{tabsBean.tabs}">
               <rich:tab name="#{tab.name}">
                    <f:facet name="header">#{tab.name}</f:facet>
 
                    <i> All the controls below are just standard JSF components skinned with RichFaces: </i>
                    <hr />
                    <h:form>
                        
                           <ui:include src="#{tab.pathDaIncludere}" />
                       
                    </h:form>
                     
                </rich:tab>
           </ui:repeat>
             
   
        </rich:tabPanel>
        </h:form>
</ui:composition>